home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 July / macformat-026.iso / mac / Shareware City / Education / PATR Lab 1.1.1 / PATR Examples / CUG.patr next >
Encoding:
Text File  |  1994-11-21  |  1.2 KB  |  92 lines  |  [TEXT/PATR]

  1. % A simplified version of Categorial Unification Grammar (CUG)
  2. % expressed in the PATR formalism.
  3.  
  4. % Examples to try:
  5.  
  6. % Parsing:        they like mary
  7. %            *they likes mary
  8.  
  9. % Generation:    Start Symbol:        s
  10. %            Max Tree Depth:    5
  11.  
  12.  
  13. X --> Y, Z #
  14. Y:cat:arg = Z,
  15. Y:cat:val = X,
  16. Y:cat:dir = forward.
  17.  
  18. X --> Z, Y #
  19. Y:cat:arg = Z,
  20. Y:cat:val = X,
  21. Y:cat:dir = backward.
  22.  
  23. word john #
  24. :cat = np,
  25. :agr:num = sg,
  26. :agr:per = 3.
  27.  
  28. word mary #
  29. :cat = np,
  30. :agr:num = sg,
  31. :agr:per = 3.
  32.  
  33. word they #
  34. :cat = np,
  35. :agr:num = pl,
  36. :agr:per = 3,
  37. :case = nom.
  38.  
  39. word them #
  40. :cat = np,
  41. :agr:num = pl,
  42. :agr:per = 3,
  43. :case = acc.
  44.  
  45. word sleeps #
  46. :cat:arg = X,
  47.     X:cat = np,
  48.     X:agr:num = sg,
  49.     X:agr:per = 3,
  50.     X:case = nom,
  51. :cat:val = Y,
  52.     Y:cat = s,
  53. :cat:dir = backward.
  54.  
  55. word sleep #
  56. :cat:arg = X,
  57.     X:cat = np,
  58.     X:agr:num = pl,
  59.     X:case = nom,
  60. :cat:val = Y,
  61.     Y:cat = s,
  62. :cat:dir = backward.
  63.  
  64. word likes #
  65. :cat:arg = X,
  66.     X:cat = np,
  67.     X:case = acc,
  68. :cat:val = Y,
  69.     Y:cat:arg = Z,
  70.         Z:cat = np,
  71.         Z:agr:num = sg,
  72.         Z:agr:per = 3,
  73.         Z:case = nom,
  74.     Y:cat:val = W,
  75.         W:cat = s,
  76.     Y:cat:dir = backward,
  77. :cat:dir = forward.
  78.  
  79. word like #
  80. :cat:arg = X,
  81.     X:cat = np,
  82.     X:case = acc,
  83. :cat:val = Y,
  84.     Y:cat:arg = Z,
  85.         Z:cat = np,
  86.         Z:agr:num = pl,
  87.         Z:case = nom,
  88.     Y:cat:val = W,
  89.         W:cat = s,
  90.     Y:cat:dir = backward,
  91. :cat:dir = forward.
  92.